import { ResPage, DevicePower, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 功率表管理模块
 */
// 获取功率表列表
export const getDevicePowerList = (params: DevicePower.ReqDevicePowerParams) => {
  return http.post<ResPage<DevicePower.ResDevicePowerList>>(`/device/power/query`, params);
};
// 获取功率表详情
export const getDevicePowerDtl = (params: { deviceId: string }) => {
  return http.post<ResultData>(`/device/power/detail`, params);
};
// 新增功率表
export const addDevicePower = (params = {}) => {
  return http.post(`/device/power/add`, params);
};
// 编辑功率表
export const editDevicePower = (params: { powerId: string }) => {
  return http.post(`/device/power/modify`, params);
};

// 删除功率表
export const deleteDevicePower = (params: { powerList: { powerId: string }[] }) => {
  return http.post(`/device/power/remove`, params);
};
